package list

import (
	"context"
	v1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/client-go/kubernetes"
	corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
)

type Client struct {
	corev1 corev1.CoreV1Interface
}

func NewListClient(cs *kubernetes.Clientset) *Client {
	return &Client{
		corev1: cs.CoreV1(),
	}
}

func (c *Client) ListNode(ctx context.Context, req metav1.ListOptions) (*v1.NodeList, error) {
	return c.corev1.Nodes().List(ctx, req)
}
